/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace DokuzEylul.Sinav.Entities
{
	/// <summary>
	/// Role object for NHibernate mapped table 'Role'.
	/// </summary>
	[Serializable]
	public class Role : Unipa.Framework.Data.BaseDbEntity
	{
		#region Member Variables
		protected int m_roleid;
		protected string m_rolecode;
		protected string m_rolecodedescription;
		#endregion
		#region Constructors
			
		public Role() {}
					
		public Role(string rolecode, string rolecodedescription) 
		{
			this.m_rolecode= rolecode;
			this.m_rolecodedescription= rolecodedescription;
		}

		#endregion
		#region Public Properties
		public  virtual int Roleid
		{
			get { return m_roleid; }
			set {m_roleid= value; }
		}
		public  virtual string RoleCode
		{
			get { return m_rolecode; }
			set {m_rolecode= value; }
		}
		public  virtual string RoleCodeDescription
		{
			get { return m_rolecodedescription; }
			set {m_rolecodedescription= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			Role castObj = (Role)obj;
			return ( castObj != null ) &&
			this.m_roleid == castObj.Roleid;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * m_roleid.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
